-- ----------------------------------------------------------
--
-- Author: czf
-- date: 2018-12-14
-- description: 命令模式-命令调用类
--
-- ----------------------------------------------------------

Broker = Broker or BaseClass()

function Broker:__init()
	self.orderList = {}
end

function Broker:TakeOrder(order)
	table.insert(self.orderList, order)
end

function Broker:PlaceOrders()
	for _, order in ipairs(self.orderList) do
		if order.Execute then
			order:Execute()
		end
	end

	self.orderList = {}
end